package com.wf.controller;

import com.wf.service.LoginService;
import com.wf.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/logout")
@CrossOrigin(origins = {"http://localhost:5173", "http://localhost:5174"})
public class LogoutController {

    @Autowired
    private LoginService loginService;

    @GetMapping()
    public Result logout(@RequestHeader("Authorization") String token){
        return loginService.logout(token);
    }

}
